package com.janlei.controller;

import com.janlei.service.AmazonAsyncService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.concurrent.ExecutionException;

/**
 * @ClassName AmazonController
 * @Description 访问器
 * @Author ZhanLei
 * @Date 2021/5/12 13:18
 */

@RestController
@RequestMapping("/1.0/s3/async")
public class AmazonAsyncController {
    private static final Logger logger = LoggerFactory.getLogger(AmazonAsyncController.class);
    @Autowired
    private AmazonAsyncService amazonAsyncService;


    @GetMapping("/download")
    public void get() throws ExecutionException, InterruptedException {
        amazonAsyncService.ops(1000000, "distractor");
    }
}
